<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    
<meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>


<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />

<meta name="theme-color" content="#f8f5ec" />
<meta name="msapplication-navbutton-color" content="#f8f5ec">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="#f8f5ec">



  <meta name="description" content="百度AI人脸识别体验"/>




  <meta name="keywords" content="百度AI, 八一" />



  <meta name="baidu-site-verification" content="HhUstaSjr0" />



  <meta name="google-site-verification" content="UA-102975942-1" />






  <link rel="alternate" href="/atom.xml" title="八一">




  <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico?v=2.6.0" />



<link rel="canonical" href="https://bay1.top/2018/05/11/百度AI人脸识别体验/"/>


<link rel="stylesheet" type="text/css" href="/css/style.css?v=2.6.0" />
<link rel="stylesheet" type="text/css" href="/css/prettify.css" media="screen" />
<link rel="stylesheet" type="text/css" href="/css/sons-of-obsidian.css" media="screen" />



  <link rel="stylesheet" type="text/css" href="/lib/fancybox/jquery.fancybox.css" />




  
  <script id="baidu_analytics">
    var _hmt = _hmt || [];
    (function() {
      var hm = document.createElement("script");
      hm.src = "https://hm.baidu.com/hm.js?9a885cc9fb6cd7bcef579deb8efe8a70";
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(hm, s);
    })();
  </script>



  <script id="google_analytics">
    (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
        })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

        ga('create', 'UA-102975942-1', 'auto');
        ga('send', 'pageview');
  </script>










    <title> 百度AI人脸识别体验 - 八一 </title>
  </head>

  <body><div id="mobile-navbar" class="mobile-navbar">
  <div class="mobile-header-logo">
    <a href="/." class="logo">八一</a>
  </div>
  <div class="mobile-navbar-icon">
    <span></span>
    <span></span>
    <span></span>
  </div>
</div>

<nav id="mobile-menu" class="mobile-menu slideout-menu">
  <ul class="mobile-menu-list">
    
      <a href="/archives">
        <li class="mobile-menu-item">
          
          
            文章
          
        </li>
      </a>
    
      <a href="/tags">
        <li class="mobile-menu-item">
          
          
            标签
          
        </li>
      </a>
    
      <a href="/about">
        <li class="mobile-menu-item">
          
          
            关于/友链
          
        </li>
      </a>
    
      <a href="/search">
        <li class="mobile-menu-item">
          
          
            站内搜索
          
        </li>
      </a>
    
  </ul>
</nav>

    <div class="container" id="mobile-panel">
      <header id="header" class="header"><div class="logo-wrapper">
  <a href="/." class="logo">八一</a>
</div>

<nav class="site-navbar">
  
    <ul id="menu" class="menu">
      
        <li class="menu-item">
          <a class="menu-item-link" href="/archives">
            
            
              文章
            
          </a>
        </li>
      
        <li class="menu-item">
          <a class="menu-item-link" href="/tags">
            
            
              标签
            
          </a>
        </li>
      
        <li class="menu-item">
          <a class="menu-item-link" href="/about">
            
            
              关于/友链
            
          </a>
        </li>
      
        <li class="menu-item">
          <a class="menu-item-link" href="/search">
            
            
              站内搜索
            
          </a>
        </li>
      
    </ul>
  
</nav>

      </header>

      <main id="main" class="main">
        <div class="content-wrapper">
          <div id="content" class="content">
            
  
  <article class="post">
    <header class="post-header">
      <h1 class="post-title">
        
          百度AI人脸识别体验
        
      </h1>

      <div class="post-meta">
        <span class="post-time">
          2018-05-11
        </span>
        
        
        
      </div>
    </header>

    
    
  <div class="post-toc" id="post-toc">
    <h2 class="post-toc-title">文章目录</h2>
    <div class="post-toc-content">
      <ol class="toc"><li class="toc-item toc-level-2"><a class="toc-link" href="#调用摄像头"><span class="toc-text">调用摄像头</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#后端调用百度AI接口"><span class="toc-text">后端调用百度AI接口</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#关于IP的确定"><span class="toc-text">关于IP的确定</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#关于签到和签出"><span class="toc-text">关于签到和签出</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#关于记录下载"><span class="toc-text">关于记录下载</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#前端页面的实现"><span class="toc-text">前端页面的实现</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#还有就是签到点击按钮会有一段时间的延迟"><span class="toc-text">还有就是签到点击按钮会有一段时间的延迟</span></a></li></ol></li></ol>
    </div>
  </div>


    <div class="post-content">
      
        <p>调用百度人脸AI接口实现人脸识别(虽然底层算法不是我写的，但是研究整个流程还是花了一些时间,毕竟是新东西)<a id="more"></a></p>
<p>首先我们先从获取摄像头中的人脸开始</p>
<h2 id="调用摄像头"><a href="#调用摄像头" class="headerlink" title="调用摄像头"></a>调用摄像头</h2><blockquote>
<p>一开始我在想一下子就想到的方法，openvc来调用摄像头获取人脸照片<br>但是这是针对网页应用,如果能通过前端获取带有人脸的照片不更好吗？把负载加到用户浏览器处<br>所以就有了下面的js代码</p>
</blockquote>
<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br></pre></td><td class="code"><pre><span class="line">$(document).ready(function () &#123;</span><br><span class="line">        var video = document.getElementById(<span class="string">'video'</span>),</span><br><span class="line">        canvas = document.getElementById(<span class="string">'canvas'</span>),</span><br><span class="line">        regButton = document.getElementById(<span class="string">'regButton'</span>),</span><br><span class="line">        student_id = document.getElementById(<span class="string">'student'</span>),</span><br><span class="line">        vendorUrl = window.URL || window.webkitURL;</span><br><span class="line">        //媒体对象</span><br><span class="line">        // 老的浏览器可能根本没有实现 mediaDevices，所以我们可以先设置一个空的对象</span><br><span class="line">        <span class="keyword">if</span> (navigator.mediaDevices === undefined) &#123;</span><br><span class="line">        navigator.mediaDevices = &#123;&#125;;</span><br><span class="line">        &#125;</span><br><span class="line">        // 一些浏览器部分支持 mediaDevices。我们不能直接给对象设置 getUserMedia </span><br><span class="line">        // 因为这样可能会覆盖已有的属性。这里我们只会在没有getUserMedia属性的时候添加它。</span><br><span class="line">        <span class="keyword">if</span> (navigator.mediaDevices.getUserMedia === undefined) &#123;</span><br><span class="line">        navigator.mediaDevices.getUserMedia = function (constraints) &#123;</span><br><span class="line"></span><br><span class="line">        // 首先，如果有getUserMedia的话，就获得它</span><br><span class="line">        var getUserMedia = navigator.webkitGetUserMedia || navigator.mozGetUserMedia;</span><br><span class="line"></span><br><span class="line">        // 一些浏览器根本没实现它 - 那么就返回一个error到promise的reject来保持一个统一的接口</span><br><span class="line">        <span class="keyword">if</span> (!getUserMedia) &#123;</span><br><span class="line">            <span class="keyword">return</span> Promise.reject(new Error(<span class="string">'getUserMedia is not implemented in this browser'</span>));</span><br><span class="line">        &#125;</span><br><span class="line"></span><br><span class="line">        // 否则，为老的navigator.getUserMedia方法包裹一个Promise</span><br><span class="line">        <span class="keyword">return</span> new Promise(function (resolve, reject) &#123;</span><br><span class="line">                getUserMedia.call(navigator, constraints, resolve, reject);</span><br><span class="line">                &#125;);</span><br><span class="line">        &#125;</span><br><span class="line">        &#125;</span><br><span class="line"></span><br><span class="line">        navigator.mediaDevices.getUserMedia(&#123; audio: false, video: &#123; <span class="string">'facingMode'</span>: <span class="string">"user"</span> &#125; &#125;)</span><br><span class="line">            .then(function (stream) &#123;</span><br><span class="line">                    var video = document.querySelector(<span class="string">'video'</span>);</span><br><span class="line">                    // 旧的浏览器可能没有srcObject</span><br><span class="line">                    <span class="keyword">if</span> (<span class="string">"srcObject"</span> <span class="keyword">in</span> video) &#123;</span><br><span class="line">                    video.srcObject = stream;</span><br><span class="line">                    &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">                    // 防止在新的浏览器里使用它，因为它已经不再支持了</span><br><span class="line">                    video.src = window.URL.createObjectURL(stream);</span><br><span class="line">                    &#125;</span><br><span class="line">                    video.onloadedmetadata = function (e) &#123;</span><br><span class="line">                    video.play();</span><br><span class="line">                    &#125;;</span><br><span class="line">                    &#125;)</span><br><span class="line">        .catch(function (err) &#123;</span><br><span class="line">                console.log(err.name + <span class="string">": "</span> + err.message);</span><br><span class="line">                &#125;);</span><br><span class="line">        regButton.addEventListener(<span class="string">'click'</span>, function () &#123;</span><br><span class="line"></span><br><span class="line">                //绘制canvas图形</span><br><span class="line">                canvas.getContext(<span class="string">'2d'</span>).drawImage(video, <span class="number">0</span>, <span class="number">0</span>, <span class="number">400</span>, <span class="number">300</span>);</span><br><span class="line"></span><br><span class="line">                //把canvas图像转为img图片</span><br><span class="line">                var data = &#123;</span><br><span class="line">                    img: canvas.toDataURL(<span class="string">"image/png"</span>),</span><br><span class="line">                    student_id: student_id.value</span><br><span class="line">                &#125;</span><br><span class="line">                $.ajax(</span><br><span class="line">                &#123;</span><br><span class="line">                    type: <span class="string">'POST'</span>,</span><br><span class="line">                    url: <span class="string">'../checkReg'</span>,</span><br><span class="line">                    data: JSON.stringify(data),</span><br><span class="line">                    dataType: <span class="string">"json"</span>,</span><br><span class="line">                    complete: function(res)&#123;</span><br><span class="line">                        console.log(res);</span><br><span class="line">                        <span class="keyword">if</span> (res.responseJSON) &#123;</span><br><span class="line">                            alert(res.responseJSON.msg);</span><br><span class="line">                        &#125;</span><br><span class="line">                        <span class="keyword">else</span> &#123;</span><br><span class="line">                            alert(<span class="string">"服务端发生错误"</span>)</span><br><span class="line">                        &#125;</span><br><span class="line">                    &#125;</span><br><span class="line">                &#125;</span><br><span class="line">                )</span><br><span class="line">    &#125;);</span><br><span class="line">&#125;)</span><br></pre></td></tr></table></figure>
<p>这里我们使用navigator来调用摄像头设备并通过canvas将video对象绘制成图片<br>再通过post传给后端就行了,这里采用了base64的方式<br>同时百度接口也只接受base64格式的图片，至此获取图片步掫我们已经完成了</p>
<h2 id="后端调用百度AI接口"><a href="#后端调用百度AI接口" class="headerlink" title="后端调用百度AI接口"></a>后端调用百度AI接口</h2><blockquote>
<p>后端接收到图像之后,经过一些必要的过滤措施<br>就可以向百度接口post数据了，但是我们首先要注意的就是把前端的图像处理一下data,base64数据需要删除”,”之后的数据<br>base64.b64decode(image.split(‘,’)[-1])<br>其他的我们都直接放置到config文件中，方便维护和调用，具体代码如下</p>
</blockquote>
<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br></pre></td><td class="code"><pre><span class="line">client = current_app.config[<span class="string">'CLIENT'</span>]</span><br><span class="line">image = base64.b64decode(image.split(<span class="string">','</span>)[<span class="number">-1</span>])</span><br><span class="line">det_options = current_app.config[<span class="string">'DETOPTIONS'</span>]</span><br><span class="line">check_image = client.detect(image, det_options)</span><br><span class="line"><span class="keyword">if</span> check_image[<span class="string">'result'</span>][<span class="number">0</span>][<span class="string">'face_probability'</span>] != <span class="number">1</span>:</span><br><span class="line">    <span class="keyword">return</span> jsonify(&#123;<span class="string">"status"</span>: <span class="keyword">False</span>, <span class="string">'msg'</span>: <span class="string">"请对准人脸"</span>&#125;)</span><br><span class="line">groupId = current_app.config[<span class="string">'GROUP_ID'</span>]</span><br><span class="line">add_options = current_app.config[<span class="string">'ADDOPTIONS'</span>]</span><br><span class="line">userInfo = <span class="string">''</span></span><br><span class="line">result = client.addUser(result_id, userInfo,</span><br><span class="line">        groupId, image, add_options)</span><br><span class="line"><span class="keyword">if</span> <span class="string">'error_code'</span> <span class="keyword">in</span> result:</span><br><span class="line">    <span class="keyword">return</span> jsonify(&#123;<span class="string">"status"</span>: <span class="keyword">False</span>, <span class="string">'msg'</span>: <span class="string">"请检查是否对准了摄像头"</span>&#125;)</span><br><span class="line">check_stu_num.log_id = result[<span class="string">'log_id'</span>]</span><br><span class="line"><span class="keyword">if</span> check_stu_num.log_id:</span><br><span class="line">    <span class="keyword">return</span> jsonify(&#123;<span class="string">"status"</span>: <span class="keyword">True</span>, <span class="string">'msg'</span>: <span class="string">"人脸更新成功"</span>&#125;)</span><br><span class="line"><span class="keyword">else</span>:</span><br><span class="line">    <span class="keyword">return</span> jsonify(&#123;<span class="string">"status"</span>: <span class="keyword">True</span>, <span class="string">'msg'</span>: <span class="string">"注册成功"</span>&#125;)</span><br></pre></td></tr></table></figure>
<blockquote>
<p>其实我们需求很简单，就是在图片中对比人脸库里的人脸识别出来他是谁,使用百度AI有点大材小用的感觉<br>我们可以自己使用opencv的相关第三方库来实现的,也可以是使用一些简单的机器学习算法来实现<br>(懒字当头,当然使用这两个的前提是你要去先熟悉一下他们~)</p>
</blockquote>
<h2 id="关于IP的确定"><a href="#关于IP的确定" class="headerlink" title="关于IP的确定"></a>关于IP的确定</h2><blockquote>
<p>这里采用了nginx记录x-header-ip数据来实现真实IP检测<br>在nginx配置里set一个X-Real-Ip,后端就可以使用request.header[‘X-Real-Ip’]来获取IP地址了<br>一些基础的IP伪造还是可以过滤掉的</p>
</blockquote>
<h2 id="关于签到和签出"><a href="#关于签到和签出" class="headerlink" title="关于签到和签出"></a>关于签到和签出</h2><blockquote>
<p>这里是通过判断用户的sign_status字段值和目前签到距离上次签到的时间来判断是否上次签出了和这次是否是签出动作<br>关键代码如下：</p>
</blockquote>
<pre><code><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">if</span> user.sign_statue <span class="keyword">and</span> now_time-user.signlogs[<span class="number">-1</span>].signtime &lt; timedelta(days=<span class="number">1</span>):</span><br><span class="line">    user.sign_statue = <span class="keyword">False</span></span><br><span class="line">    <span class="keyword">return</span> jsonify(&#123;<span class="string">"status"</span>: <span class="keyword">True</span>, <span class="string">'msg'</span>: user.name+<span class="string">"\n您签出成功了~"</span>&#125;)</span><br><span class="line">    <span class="keyword">elif</span> <span class="keyword">not</span> user.sign_statue:</span><br><span class="line">    user.sign_statue = <span class="keyword">True</span></span><br><span class="line">    <span class="keyword">return</span> jsonify(&#123;<span class="string">"status"</span>: <span class="keyword">True</span>, <span class="string">'msg'</span>: user.name+<span class="string">"\n您签到成功了~\n记得签出！！！！！！！！！"</span>&#125;)</span><br><span class="line">    <span class="keyword">else</span>:</span><br><span class="line">    user.sign_statue = <span class="keyword">True</span></span><br><span class="line">    <span class="keyword">return</span> jsonify(&#123;<span class="string">"status"</span>: <span class="keyword">False</span>, <span class="string">'msg'</span>: user.name+<span class="string">"\n您上次值班没有签出~\n就先放过你，下次别忘了哦~\n签到成功~"</span>&#125;)</span><br></pre></td></tr></table></figure>
</code></pre><h2 id="关于记录下载"><a href="#关于记录下载" class="headerlink" title="关于记录下载"></a>关于记录下载</h2><blockquote>
<p>就是一个对数据库查询和对xls文件写入的操作<br>然后为了办公方便,读取传入的指定days来确定要下载的天数<br>然后为了省事，也就是办公只需要签到历史，就采用了文件直接下载的形式<br>抛却了后台，只是构造密码形式的路由就行了<br>相似的，用户的录入也是同理只是对xls的读取操作罢了~</p>
</blockquote>
<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">for</span> user <span class="keyword">in</span> users:</span><br><span class="line">    <span class="keyword">for</span> user_signlog <span class="keyword">in</span> user.signlogs:</span><br><span class="line">        now_time = datetime.now()</span><br><span class="line">        <span class="keyword">if</span> <span class="keyword">not</span> now_time-user_signlog.signtime &lt; timedelta(hours=<span class="number">20</span>*int(days)):</span><br><span class="line">            <span class="keyword">continue</span></span><br><span class="line">...</span><br><span class="line">data.save(current_app.config[<span class="string">'SIGN_LOGS_CONTENS'</span>]+<span class="string">r'/result.xls'</span>)</span><br><span class="line"><span class="keyword">return</span> send_from_directory(current_app.config[<span class="string">'SIGN_LOGS_CONTENS'</span>], <span class="string">'result.xls'</span>)</span><br></pre></td></tr></table></figure>
<h2 id="前端页面的实现"><a href="#前端页面的实现" class="headerlink" title="前端页面的实现"></a>前端页面的实现</h2><blockquote>
<p>刚才已经说了一个摄像头的调用<br>当然也会在前端实时显示摄像头以便用户拍照操作<br>然后也是采用了类似微信登陆页面的样式(或许是为了懒省事)<br>中间的盒子模型，定义一下各种元素的位置和大小(后期维护可以根据需要调整)</p>
</blockquote>
<h3 id="还有就是签到点击按钮会有一段时间的延迟"><a href="#还有就是签到点击按钮会有一段时间的延迟" class="headerlink" title="还有就是签到点击按钮会有一段时间的延迟"></a>还有就是签到点击按钮会有一段时间的延迟</h3><blockquote>
<p>这个动作我正在添加loading界面<br>以防用户不断的点击button按钮，来催促网页有回显</p>
</blockquote>
<p>PS：数据库的建立是一对多的形式形式</p>
<p><img src="https://s1.ax1x.com/2018/05/11/C0tfoT.png" alt="QQ截图20180509012945.png"></p>

      
    </div>

    
      
      



      
      
    

    
      <footer class="post-footer">
        
          <div class="post-tags">
            
              <a href="/tags/百度AI/">百度AI</a>
            
          </div>
        
        
        
  <nav class="post-nav">
    
      <a class="prev" href="/2018/05/11/梯度下降求解最小二乘/">
        <i class="iconfont icon-left"></i>
        <span class="prev-text nav-default">梯度下降求解最小二乘</span>
        <span class="prev-text nav-mobile">上一篇</span>
      </a>
    
    
      <a class="next" href="/2018/05/11/模拟上传multipart-form-data-脚本生成时间轴/">
        <span class="next-text nav-default">模拟上传multipart/form-data/脚本生成时间轴</span>
        <span class="prev-text nav-mobile">下一篇</span>
        <i class="iconfont icon-right"></i>
      </a>
    
  </nav>

      </footer>
    

  </article>


          </div>
          
  <div class="comments" id="comments">
      <div id="disqus_thread">
        <noscript>
          Please enable JavaScript to view the
          <a href="//disqus.com/?ref_noscript">comments powered by Disqus.</a>
        </noscript>
      </div> 
    </div>
  </div>


        </div>
      </main>

      <footer id="footer" class="footer">

  <div class="social-links">
    
      
        
          <a href="https://github.com/bay1" class="iconfont icon-github" title="github"></a>
        
      
    
      
        
          <a href="http://weibo.com/3190704711/profile?topnav=1&wvr=6&is_all=1" class="iconfont icon-weibo" title="weibo"></a>
        
      
    
      
    
      
    
      
    
    
    
  </div>


<div class="copyright">
  <span class="copyright-year">
    
    &copy; 
     
      2016 - 
    
    2018
    <span class="author">bay1</span>
  </span>
</div>
      </footer>

      <div class="back-to-top" id="back-to-top">
        <i class="iconfont icon-up"></i>
      </div>
    </div>

    
  
  <script type="text/javascript">
    var disqus_config = function () {
        this.page.url = 'https://bay1.top/2018/05/11/百度AI人脸识别体验/';
        this.page.identifier = '2018/05/11/百度AI人脸识别体验/';
        this.page.title = '百度AI人脸识别体验';
    };
    (function() {
    var d = document, s = d.createElement('script');

    s.src = '//https-blog-flywinky-top-1.disqus.com/embed.js';

    s.setAttribute('data-timestamp', +new Date());
    (d.head || d.body).appendChild(s);
    })();  
  </script>



    
  





  
    <script type="text/javascript" src="/lib/jquery/jquery-3.1.1.min.js"></script>
  

  
    <script type="text/javascript" src="/lib/slideout/slideout.js"></script>
  

  
    <script type="text/javascript" src="/lib/fancybox/jquery.fancybox.pack.js"></script>
  


    <script type="text/javascript" src="/js/src/even.js?v=2.6.0"></script>
<script type="text/javascript" src="/js/src/bootstrap.js?v=2.6.0"></script>
<script src="/js/prettify.js"></script>
<script type="text/javascript">
$(document).ready(function(){
 $('pre').addClass('prettyprint');
   prettyPrint();
 })
</script>
  </body>
</html>
